package org.alternativedev.wo42.gameobjects.entities;

import org.alternativedev.wo42.Game;
import org.alternativedev.wo42.map.Map;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

public class EntityNPCHostile extends EntityNPC {

	public EntityNPCHostile(int locX, int locY, Image[] gfxUp, Image[] gfxDown,
			Image[] gfxLeft, Image[] gfxRight, int[] dur) {
		super(locX, locY, gfxUp, gfxDown, gfxLeft, gfxRight, dur);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onUpdate(GameContainer gc, int delta, Map map, Game game)
			throws SlickException {
		super.onUpdate(gc, delta, map, game);
		if (this.collidesWith(map.getPlayer()))
			map.getPlayer().setHealth(map.getPlayer().getHealth() - 10);
	}

}
